﻿using System.Windows;
using System.Windows.Forms;

namespace DailyFx.UI
{
    public class Dimension
    {
        private static readonly int _height;
        private static readonly int _width;
		//
        private const double _div = 1.618;

		/// <summary>
		/// 
		/// </summary>
		static Dimension ()
        {
            _height = Screen.PrimaryScreen.WorkingArea.Height;
            _width = Screen.PrimaryScreen.WorkingArea.Width;
        }

		public static readonly DependencyProperty LeftProperty
			= DependencyProperty.RegisterAttached("Left", typeof(int), typeof(Dimension));
		
		public static int GetLeft ( DependencyObject target )
        {
            return (int)target.GetValue(LeftProperty);
        }
        public static void SetLeft ( DependencyObject target, int value )
        {
            target.SetValue(LeftProperty, value);
        }


		public static readonly DependencyProperty TopProperty 
			= DependencyProperty.RegisterAttached("Top", typeof(int), typeof(Dimension));
	
        public static int GetTop ( DependencyObject target )
        {
            return (int)target.GetValue(TopProperty);
        }
        public static void SetTop ( DependencyObject target, int value )
        {
            target.SetValue(TopProperty, value);
        }


		public static readonly DependencyProperty WidthProperty 
			= DependencyProperty.RegisterAttached("Width", typeof(int), typeof(Dimension));
     
        public static int GetWidth ( DependencyObject target )
        {
            return (int)target.GetValue ( WidthProperty );
        }
        public static void SetWidth ( DependencyObject target, int value )
        {
            target.SetValue ( WidthProperty, value );
        }


		public static readonly DependencyProperty HeightProperty
			= DependencyProperty.RegisterAttached("Height", typeof(int), typeof(Dimension));
       
        public static int GetHeight ( DependencyObject target )
        {
            return (int)target.GetValue(HeightProperty);
        }
        public static void SetHeight ( DependencyObject target, int value )
        {
            target.SetValue(HeightProperty, value);
        }
    }
}
